import React from 'react'
import './style.less'

export default class RechargeSubPage extends React.Component {
  render() {
    const data = this.props.data
    return(
      <div className='recharge-list'>
        {
          data.map((element,index) => {
            return(
              <div className='items clear' key={ index }>
                <div className='item-left'>
                  <span>￥{element.price}</span>
                  <span>赠送{element.givePrice}元</span>
                </div>
                <div className='item-right'>
                  {
                    element.favourable === '1'
                    ? <span>新人优惠</span>
                    :''
                  }
                  <button>购买</button>
                </div>
              </div>
            )
          })
        }


      </div>
    )
  }
}
